package org.meetunexpectedly.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description:
 * @Author: pupil
 * @Date: 2024/08/03 下午 7:04
 */
@Data
public class BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO) // 标记主键，id自增
    private Long id;

    /**
     * 逻辑删除：0：未删除   1：删除   默认为0
     */
    @TableLogic
    private Boolean isDeleted;

    @TableField(fill = FieldFill.INSERT) // 插入时自动填充
    private Date gmtCreated;

    @TableField(fill = FieldFill.INSERT_UPDATE) // 插入或者更新时自动填充
    private Date gmtUpdated;
}
